package com.zbkj.front.service.impl;

import com.baomidou.dynamic.datasource.annotation.DS;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.zbkj.common.model.merchant.PointUser;
import com.zbkj.common.model.order.RefundOrderStatus;
import com.zbkj.front.service.PointUserService;
import com.zbkj.service.dao.PointUserDao;
import com.zbkj.service.dao.RefundOrderStatusDao;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
@RequiredArgsConstructor
public class PointUserServiceImpl extends ServiceImpl<PointUserDao, PointUser>
        implements PointUserService {


    @Override
    @DS("pointarchive")
    public PointUser selectPointUserByPhone(String phone) {
        QueryWrapper<PointUser> lqw = new QueryWrapper<PointUser>().
                select("id", "avatar").eq("phonenumber", phone);
        lqw.last(" limit 1");
        PointUser etProcesssTypes = this.getBaseMapper().selectOne(lqw);
        return etProcesssTypes;
    }
}
